import { Menu } from 'antd';
import { MailOutlined, ApartmentOutlined, SettingOutlined } from '@ant-design/icons';
import React from 'react';
import { Layout } from 'antd';
import { useNavigate , Outlet} from 'react-router-dom';
const { Header, Footer, Sider, Content } = Layout;

function LmdRouter(props) {
    
    //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------
    
    var push = useNavigate();
    
    const goKeyrouter = function({ item, key, keyPath, domEvent }) {
        //-----🍌---🍌---🍌-----
        push(key);
    }
    
    //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------
 

    return (
        <div>
            <Menu theme='dark' mode="inline" defaultSelectedKeys={['key']}>
                <Menu.SubMenu onClick={ goKeyrouter } key="SubMenu" title="仓库管理" icon={<ApartmentOutlined />}>
                    <Menu.Item key="/index/warehousingmanagement" >
                        入库管理
                    </Menu.Item>
                    <Menu.Item key="/index/deliverymanagement" >
                        出库管理
                    </Menu.Item>
                    <Menu.Item key="/index/warehousestructure" >
                        仓库结构
                    </Menu.Item>
                    <Menu.Item key="/index/warehousemanagement" >
                        仓储管理
                    </Menu.Item>
                    <Menu.Item key="/index/warehousereport" >
                        仓库报表
                    </Menu.Item>
                </Menu.SubMenu>
            </Menu>
        </div>
    );
}

export default LmdRouter;